home *** CD-ROM | disk | FTP | other *** search
- ///////////////////////////////////////////////////////////////////////////////
- // FILENAME: BBC.h
- // SUMMARY: Interface for a Billiard-Ball Computation Annotation
- // SUPERCLASS: Object
- // INTERFACE: None
- // PROTOCOLS: <DocNotification,Annotation,Tool,ASCIISupport>
- // AUTHOR: Rohit Khare
- // COPYRIGHT: (c) 1994 California Institure of Technology, eText Project
- // COPYRIGHT: (c) 1992 Rohit Khare (core simulation code)
- ///////////////////////////////////////////////////////////////////////////////
- // DESCRIPTION
- // A quintessential example of an eText Annotation. A BBC-simulator
- // brings the entire discussion "alive". It also demonstrates the programming
- // technique for reusing already-written View classes.
- // Separated out model from old BilliardView code.
- ///////////////////////////////////////////////////////////////////////////////
- // HISTORY
- // 05/29/94: Created as an eText Annotation.
- // 1992-93: Developed for CS20ab.
- ///////////////////////////////////////////////////////////////////////////////
-
- #import "eTextKernel.h"
- #import "BBCUI.h"
-
- @interface BBC : Object <DocNotification,Annotation,Tool,ASCIISupport>
- {
- NXAtom theName;
- char **state;
- char **oldstate;
- BOOL isAccelerated;
- BOOL isEditable;
- BOOL doesShowPath;
- BOOL dirFwd;
- BOOL isLinked;
- int hres, vres;
- id bbcView;
- id scrollView;
- id etDoc;
- }
-
- - (NXAtom) name;
- - (char *) filename;
- - (BOOL) doesShowPath;
- - (BOOL) isAccelerated;
- - (BOOL) isEditable;
- - (int) hres;
- - (int) vres;
- - (char **) state;
- - setName:(NXAtom) newName;
- - setShowPath:(BOOL) newState;
- - setAccelerated:(BOOL) newState;
- - setEditable:(BOOL) newState;
- - setRes:(int)h :(int)v;
- - stepForward;
- - reverse;
- - stepBackward;
- - step;
- @end
-
- @interface BilliardView : View
- {
- id theBBC;
- int x,y;
- id Mucus, Wall, N,S,E,W, Empty, Grid;
- id cacheGrid;
- }
- - setBBC:newBBC;
- - setRes:(int) hres :(int) vres;
- @end
-